# Contributor: Roberto Oliveira <robertoguimaraes8@gmail.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=tuptime
pkgver=5.2.2
pkgrel=3
pkgdesc="Report the historical and statistical real time of the system"
url="https://github.com/rfmoz/tuptime"
arch="noarch"
license="GPL-2.0-only"
pkgusers="tuptime"
pkggroups="tuptime"
depends="python3"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rfmoz/tuptime/archive/refs/tags/$pkgver.tar.gz
	$pkgname.initd
	$pkgname.cron
	"
options="!check" # no tests

package() {
	install -Dm775 src/tuptime -t "$pkgdir"/usr/bin/
	install -Dm755 "$srcdir"/tuptime.cron "$pkgdir"/etc/periodic/15min/$pkgname
	install -Dm755 "$srcdir"/tuptime.initd "$pkgdir"/etc/init.d/tuptime
	install -Dm644 src/man/tuptime.1 -t "$pkgdir"/usr/share/man/man1/
	install -dm755 -o tuptime -g tuptime "$pkgdir"/var/lib/tuptime/
}

sha512sums="
3a4b0ab3776bdcbe1bf7afd88df9f700251d9072026338cecd139dbe4c8c00a259e3fc95fef094709417bfe5059ae9a6de0422e7286dc73f3caa7e737a25f526  tuptime-5.2.2.tar.gz
f2009b2ef162b9fbb44e079d67688bee26b4459b8d6b223d4f26b311e72c2b0af313aef32a308ca7508ac9834eb21c172c761cb32cc2e6d4357ec719508f4125  tuptime.initd
41a4f9e85b1aa23f03c0496fd76fb3c743ccdc251890352ce2d85e8ea5ef4a7040b7b8fb47fdd7ac3ae6c284285c52a7577ebd45de86ee9bddb7d997e874b8b2  tuptime.cron
"
